<?php

namespace common\models;

use Yii;

/**
 * This is the model class for table "{{%menu}}".
 *
 * @property integer $id
 * @property string $title
 * @property integer $parent_id
 * @property integer $sort
 * @property string $link
 * @property string $check_link
 * @property integer $created_at
 * @property integer $update_at
 */
class Menu extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return '{{%menu}}';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['parent_id', 'sort', 'created_at', 'update_at'], 'integer'],
            [['title'], 'string', 'max' => 20],
            [['link', 'check_link'], 'string', 'max' => 60],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'title' => '菜单标题',
            'parent_id' => '父级id',
            'sort' => '排序',
            'link' => '链接',
            'check_link' => 'Check Link',
            'created_at' => '创建时间',
            'update_at' => '更新时间',
        ];
    }
}
